﻿namespace Cos.Module.Form.NHibernate.Test
{
    using Cos.Core.NHibernate;
    using Cos.Core.NHibernate.Tests;

    using NUnit.Framework;

    [TestFixture]
    public class FormElementCultureDataModelFixture : ModuleFixtureBase
    {
        [Test]
        public void CanMapFormElementCultureDataModel()
        {
            new PersistenceSpecification<FormElementCultureDataModel>(Session)
                //.CheckReference(x => x.CultureCode, this.Culture.Id)
                .CheckProperty(x => x.FormElementId, this.FormElement.Id)
                .CheckProperty(x => x.NameLive, "name live")
                .CheckProperty(x => x.NamePreview, "name preview")
                .CheckProperty(x => x.Status, "Approved")
                .CheckProperty(x => x.TextCulture1, "text culture 1")
                .CheckProperty(x => x.TextCulture1Live, "text culture 1 live")
                .CheckProperty(x => x.TextCulture2, "text culture 2")
                .CheckProperty(x => x.TextCulture2Live, "text culture 2 live")
                .CheckProperty(x => x.TextCulture3, "text culture 3")
                .CheckProperty(x => x.TextCulture3Live, "text culture 3 live")
                .CheckProperty(x => x.ToolTipLive, "tooltip live")
                .CheckProperty(x => x.ToolTipPreview, "tooltip preview")
                .CheckProperty(x => x.VisibleLive, true)
                .CheckProperty(x => x.VisiblePreview, true)
                .VerifyTheMappings();
        }
    }
}
